<?php /*a:1:{s:52:"/var/www/html/application/admin/view/house/edit.html";i:1600673602;}*/ ?>
<!DOCTYPE html>
<html class="x-admin-sm">
<head>
    <meta charset="UTF-8">
    <title>欢迎页面-X-admin2.2</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport"
          content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi"/>
    <link rel="stylesheet" href="/static/css/font.css">
    <link rel="stylesheet" href="/static/css/xadmin.css">
    <script type="text/javascript" src="/static/lib/layui/layui.js" charset="utf-8"></script>
    <script type="text/javascript" src="/static/js/xadmin.js"></script>
    <!-- 让IE8/9支持媒体查询，从而兼容栅格 -->
    <!--[if lt IE 9]>
    <script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
    <script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
    <![endif]--></head>

<body>
<div class="layui-fluid">
    <div class="layui-row">
        <form class="layui-form">

            <input type="hidden" name="id" value="<?php echo htmlentities($simpleInfo['id']); ?>">

            <div class="layui-form-item">
                <label class="layui-form-label">商圈</label>
                <div class="layui-input-inline">
                    <select name="business_area_id" lay-search="">
                        <?php foreach($businessAreaList as $businessAreaList_v): ?>
                        <option value="<?php echo htmlentities($businessAreaList_v['id']); ?>"
                        <?php if($simpleInfo['business_area_id']==$businessAreaList_v['id']) { ?> selected <?php } ?>
                        ><?php echo htmlentities($businessAreaList_v['name']); ?></option>
                        <?php endforeach; ?>
                    </select>
                </div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label">小区</label>
                <div class="layui-input-inline">
                    <select name="village_id">
                        <?php foreach($valligeList as $valligeList_v): ?>
                        <option value="<?php echo htmlentities($valligeList_v['id']); ?>"
                        <?php if($simpleInfo['village_id']==$valligeList_v['id']) { ?> selected <?php } ?>
                        ><?php echo htmlentities($valligeList_v['name']); ?></option>
                        <?php endforeach; ?>
                    </select>
                </div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label">评估价(元)</label>
                <div class="layui-input-inline">
                    <input type="number" name="consult_price" required="" autocomplete="off"
                           value="<?php echo htmlentities($simpleInfo['consult_price']); ?>"
                           class="layui-input"></div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label">预估成交价(元)</label>
                <div class="layui-input-inline">
                    <input type="number" name="predict_price" required="" autocomplete="off"
                           value="<?php echo htmlentities($simpleInfo['predict_price']); ?>"
                           class="layui-input"></div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label">市场价（元）</label>
                <div class="layui-input-inline">
                    <input type="number" name="market_price" required="" autocomplete="off"
                           value="<?php echo htmlentities($simpleInfo['market_price']); ?>"
                           class="layui-input"></div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label">提醒人数</label>
                <div class="layui-input-inline">
                    <input type="text" name="remind_num" required="" autocomplete="off"
                           value="<?php echo htmlentities($simpleInfo['remind_num']); ?>"
                           class="layui-input"></div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label">户型</label>
                <div class="layui-input-inline">
                    <select name="bedroom">
                        <?php foreach($bedroomList as $bedroomList_v): ?>
                        <option value="<?php echo htmlentities($bedroomList_v['key']); ?>"
                        <?php if($simpleInfo['bedroom']==$bedroomList_v['key']) { ?> selected <?php } ?>
                        ><?php echo htmlentities($bedroomList_v['value']); ?></option>
                        <?php endforeach; ?>
                    </select>
                </div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label">面积</label>
                <div class="layui-input-inline">
                    <input type="number" name="build_area" required="" autocomplete="off"
                           value="<?php echo htmlentities($simpleInfo['build_area']); ?>"
                           class="layui-input"></div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label">楼层</label>
                <div class="layui-input-inline">
                    <input type="number" name="floor" required="" autocomplete="off" value="<?php echo htmlentities($simpleInfo['floor']); ?>"
                           class="layui-input"></div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label">建筑年代</label>
                <div class="layui-input-inline">
                    <input type="text" name="build_time" required="" autocomplete="off"
                           value="<?php echo htmlentities($simpleInfo['build_time']); ?>"
                           class="layui-input"></div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label">装修</label>
                <div class="layui-input-inline">
                    <select name="renovation_type">
                        <?php foreach($renovationTypeList as $renovationTypeList_v): ?>
                        <option value="<?php echo htmlentities($renovationTypeList_v['key']); ?>"
                        <?php if($simpleInfo['renovation_type']==$renovationTypeList_v['key']) { ?> selected <?php } ?>
                        ><?php echo htmlentities($renovationTypeList_v['value']); ?></option>
                        <?php endforeach; ?>
                    </select>
                </div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label">产权类型</label>
                <div class="layui-input-inline">
                    <select name="property_type">
                        <?php foreach($propertyTypeList as $propertyTypeList_v): ?>
                        <option value="<?php echo htmlentities($propertyTypeList_v['key']); ?>"
                        <?php if($simpleInfo['property_type']==$propertyTypeList_v['key']) { ?> selected <?php } ?>
                        ><?php echo htmlentities($propertyTypeList_v['value']); ?></option>
                        <?php endforeach; ?>
                    </select>
                </div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label">是否有电梯</label>
                <div class="layui-input-inline">
                    <select name="lifts">
                        <?php foreach($liftsList as $liftsList_v): ?>
                        <option value="<?php echo htmlentities($liftsList_v['key']); ?>"
                        <?php if($simpleInfo['lifts']==$liftsList_v['key']) { ?> selected <?php } ?>
                        ><?php echo htmlentities($liftsList_v['value']); ?></option>
                        <?php endforeach; ?>
                    </select>
                </div>
            </div>

            <div class="layui-form-item">
                <label for="L_repass" class="layui-form-label"></label>
                <button class="layui-btn" lay-filter="add" lay-submit="" type="button">提交</button>
            </div>

        </form>
    </div>
</div>
<script>layui.use(['form', 'layer'],
    function () {
        $ = layui.jquery;
        var form = layui.form,
            layer = layui.layer;

        //监听提交
        form.on('submit(add)',
            function (data) {
                $.post('<?php echo url("House/submit"); ?>', $('form').serialize(), function (resp) {
                    if (resp.code == 200) {
                        layer.alert("操作成功", {
                                icon: 6
                            },
                            function () {
                                $("iframe[name=iframeundefined]", parent.document).contents().find('#refresh').trigger("click");
                                // 关闭当前frame
                                xadmin.close();
                                //  可以对父窗口进行刷新
                                $("#refresh" , parent.document).trigger("click")
                            });
                    }else {
                        layer.msg(resp.msg, {
                            icon: 5,
                            time: 2000
                        });
                    }
                }, 'json');
                return false;
            });

    });</script>
<script>var _hmt = _hmt || [];
(function () {
    var hm = document.createElement("script");
    hm.src = "https://hm.baidu.com/hm.js?b393d153aeb26b46e9431fabaf0f6190";
    var s = document.getElementsByTagName("script")[0];
    s.parentNode.insertBefore(hm, s);
})();</script>
</body>

</html>
